<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="description" content="innoTweets - Let's have some fun !">
    <meta name="author" content="Dino Babu Kannampuzha (DBK) - Innovature Labs">
    <title>innoTweets<?php if (!empty($menu_active)) { ?> <?php echo ' : ' . ucfirst($menu_active); ?> <?php } ?></title>
    <link rel="icon" href="<?php echo base_url(); ?>assets/img/favicon.ico">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/bootstrap.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/bootstrap.responsive.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/styles.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/toastr.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/fullcalendar.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/datepicker.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/shadowbox.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/bootstrap.wysihtml5.css">
    <link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/tipsy.css">
    <script src="<?php echo base_url(); ?>assets/js/jquery.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/bootstrap.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/bootbox.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/toastr.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/jquery.knob.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/fullcalendar.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/bootstrap.datepicker.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/shadowbox.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/date.format.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/bootstrap.wysihtml5.core.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/bootstrap.wysihtml5.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/jquery.tipsy.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/jquery.peity.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/flowplayer/flowplayer.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/jquery.lazy.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/readmore.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/smileys.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/config.js?<?php echo date('dmY'); ?>"></script>
  </head>
  <body>
    <input type="hidden" value="<?php echo site_url(); ?>" name="site_url" id="site_url"/>
	<?php if (!empty($this->current_user)) { ?>
  	<input type="hidden" value="1" name="is_signin" id="is_signin"/>
	  <?php if ($this->current_user['user_birthday_date'] == '0000-00-00 00:00:00' || $this->current_user['user_join_date'] == '0000-00-00 00:00:00' || $this->current_user['user_position'] == '' || $this->current_user['user_skills'] == '' || $this->current_user['user_experience'] == '' || $this->current_user['user_place'] == '') { ?>
		<input type="hidden" value="1" name="incomplete_profile" id="incomplete_profile"/> 
	  <?php } else { ?>
		<input type="hidden" value="0" name="incomplete_profile" id="incomplete_profile"/> 
	  <?php } ?>
	<?php } else { ?>
  	<input type="hidden" value="0" name="is_signin" id="is_signin"/>
	<?php } ?>
	<?php if ($this->session->flashdata('crawler_warning') == 'YES') { ?>
  	<input type="hidden" value="1" name="crawler_warning" id="crawler_warning"/>
	<?php } else { ?>
  	<input type="hidden" value="0" name="crawler_warning" id="crawler_warning"/>
	<?php } ?>
    <div id="in-nav">
      <div class="container">
        <div class="row">
          <div class="span12">
			<?php if (!empty($this->current_user)) { ?>
  			<ul class="pull-right">
				<?php if ($this->is_admin) { ?>
				  <li>
					<a title="You have admin privilages :)" style="text-decoration: none; cursor: pointer;"><i class="icon-large icon-user"></i></a>
				  </li>
				  <li>|</li>
				<?php } else { ?>
				  <li>
					<a title="Insall Firefox Notification Addon" style="text-decoration: none; cursor: pointer;" href="<?php echo base_url('download/firefox_addon'); ?>"><i class="icon-large icon-bell"></i></a>
				  </li>
				  <li>|</li>
				<?php } ?>
  			  <li>
  				<a title="Notifications" class="notification-container dropdown-toggle" style="cursor: pointer;" data-toggle="dropdown" onclick="return show_notification_list();"><i class="icon-globe"></i><span id="user_notification_count" class="notification-counter" style="display: none;"></span></a>
  				<ul id="notification_loading" class="dropdown-menu notification-dropdown-menu" role="menu" style="position: absolute; margin-top: 20px; width: 100%;">
  				  <li>
  					<a style="word-wrap: break-word; white-space: normal; cursor: pointer;"><span style="margin-left: 100px;"><img src="<?php echo base_url('assets/img/loading_black.gif'); ?>"/>&nbsp;Loading...</span></a>
  				  </li>
  				</ul>
  				<ul id="notification_data" class="dropdown-menu notification-dropdown-menu" role="menu" style="position: absolute; margin-top: 20px; width: 100%;"></ul>
  			  </li>
  			  <li>|</li>
  			  <li>
  				<a title="Your profile" style="text-decoration: none;" href="<?php echo base_url('profile'); ?>">@<?php echo $this->current_user['user_name']; ?></a>
  			  </li>
  			  <li>|</li>
  			  <li>
  				<a title="Settings" style="text-decoration: none;" href="<?php echo base_url('settings'); ?>"><i class="icon-large icon-cog"></i></a>
  			  </li>
  			  <li>|</li>
  			  <li><a style="text-decoration: none;" href="<?php echo base_url('signout'); ?>">Signout</a></li>
  			</ul>
			<?php } else { ?>
  			<ul class="pull-right">
  			  <li><a style="text-decoration: none;" href="<?php echo base_url('signin'); ?>" title="Login to your account">SignIn</a></li>
  			  <li>|</li>
  			  <li><a style="text-decoration: none;" href="<?php echo base_url('signup'); ?>" title="Create a new account">SignUp</a></li>
  			  <li>|</li>
  			  <li><a style="text-decoration: none;" href="<?php echo base_url('reset_password'); ?>" title="Reset password of your account">Reset</a></li>
  			</ul>
			<?php } ?>
            <div style="width: 350px;">
              <a style="text-decoration: none;" id="logo" href="<?php echo base_url(); ?>">
                <h4>inno<strong>Tweets</strong></h4>
              </a>
            </div>
          </div>
        </div>
      </div>
    </div>
	<?php $header_counts = $this->settings_model->get_header_counts(); ?>
	<?php $header_counts = $header_counts['result']; ?>
	<?php if (($this->current_user) || @$menu_active == 'credits') { ?>
  	<div id="in-sub-nav">
  	  <div class="container">
  		<div class="row">
  		  <div class="span12">
  			<ul>
  			  <li>
  				<a <?php if ($menu_active == 'timeline') { ?> class="active" <?php } ?>href="<?php echo base_url('timeline'); ?>">
  				  <i class="batch stream"></i><br>Timeline
  				</a>
  			  </li>
  			  <li>
  				<span id="tweets_total_count" class="label label-important pull-right" style="cursor: pointer; <?php if (empty($header_counts['tweet_total_count'])) { ?> display: none; <?php } ?>" title="Number of tweets added today"><?php echo @$header_counts['tweet_total_count']; ?></span>
  				<a <?php if ($menu_active == 'tweets') { ?> class="active" <?php } ?>href="<?php echo base_url('tweets'); ?>">
  				  <i class="batch forms"></i><br>Tweets
  				</a>
  			  </li>
  			  <li>
				  <?php $all_event_total_count = (int) ($header_counts['event_total_count'] + $header_counts['birthday_total_count'] + $header_counts['joinday_total_count']); ?>
  				<span id="events_total_count" class="label label-important pull-right" style="cursor: pointer; <?php if (empty($all_event_total_count)) { ?> display: none; <?php } ?>" title="Number of events happening today"><?php echo @$all_event_total_count; ?></span>
  				<a <?php if ($menu_active == 'events') { ?> class="active" <?php } ?>href="<?php echo base_url('events'); ?>">
  				  <i class="batch calendar"></i><br>Events
  				</a>
  			  </li>
  			  <li>
  				<span id="albums_total_count" class="label label-important pull-right" style="cursor: pointer; <?php if (empty($header_counts['album_total_count'])) { ?> display: none; <?php } ?>" title="Number of albums added today"><?php echo @$header_counts['album_total_count']; ?></span>
  				<a <?php if ($menu_active == 'albums') { ?> class="active" <?php } ?>href="<?php echo base_url('albums'); ?>">
  				  <i class="batch quill"></i><br>Albums
  				</a>
  			  </li>
  			  <li>
  				<span id="polls_total_count" class="label label-important pull-right" style="cursor: pointer; <?php if (empty($header_counts['poll_total_count'])) { ?> display: none; <?php } ?>" title="Number of polls added today"><?php echo @$header_counts['poll_total_count']; ?></span>
  				<a <?php if ($menu_active == 'polls') { ?> class="active" <?php } ?>href="<?php echo base_url('polls'); ?>">
  				  <i class="batch tables"></i><br>Polls
  				</a>
  			  </li>
  			  <li>
  				<span id="groups_total_count" class="label label-important pull-right" style="cursor: pointer; <?php if (empty($header_counts['groups_total_count'])) { ?> display: none; <?php } ?>" title="Number of group results published today"><?php echo @$header_counts['groups_total_count']; ?></span>
  				<a <?php if ($menu_active == 'groups') { ?> class="active" <?php } ?>href="<?php echo base_url('groups'); ?>">
  				  <i class="batch container"></i><br>Groups
  				</a>
  			  </li>
  			  <li>
  				<span id="online_total_count" class="label label-important pull-right" style="cursor: pointer; <?php if (empty($header_counts['online_total_count'])) { ?> display: none; <?php } ?>" title="Number of online users"><?php echo @$header_counts['online_total_count']; ?></span>
  				<a <?php if ($menu_active == 'users') { ?> class="active" <?php } ?>href="<?php echo base_url('users'); ?>">
  				  <i class="batch users"></i><br>Innovators
  				</a>
  			  </li>
  			</ul>
  		  </div>
  		</div>
  	  </div>
  	</div>
	<?php } ?>